//
// NoticeView.js
// 通知

import React, { Component } from 'react'
import {
  View,
  Text,
  TouchableWithoutFeedback,
  StyleSheet,
  TextInput,
  Button,
} from 'react-native'

import NavHeader from '../Common/View/CommonNavTitleView'
import NoticeListView from '../Notice/NoticeListView'
import NoticeSearchBar from '../Notice/NoticeSearchBarView'
import TabBar from '../Notice/NoticeTabView'


export default class  NoticeView  extends  Component {
  constructor(props) {
    super(props)

    this.state = {
      tabId:''
    }
  }

  _tabSelect(tabId) {
    this.setState({
      tabId:tabId
    })
  }

  render() {
    return (
      <View style={{flexGrow:1}}>
        <NavHeader navigation={this.props.navigation} hideBack={true}/>
        <NoticeSearchBar style={{position:'absolute',top:27,left:9,right:9,height:30,flexDirection:'row'}}/>
        <TabBar tabSelected={(tabId)=>{
          this.refs.listView._refresh()
        }}/>
        <NoticeListView key='tab-notice-list' ref='listView' typeId={this.state.tabId}/>
      </View>
    )
  }
};

const styles = StyleSheet.create ({
  tab:{
    flexGrow:1,
    justifyContent:'center',
    backgroundColor:'white'
  },
  tabTitle: {
    alignSelf:'center'
  }
})
